<?php
session_start();
      if (isset($_SESSION['k_username'])) {
?>
<html>
<head>
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
<link rel="stylesheet" type="text/css" media="all" href="../../calendario/calendar-green.css" title="win2k-cold-1" /> 
 <!-- librería principal del calendario -->
 <script type="text/javascript" src="../../calendario/calendar.js"></script>

 <!-- librería para cargar el lenguaje deseado -->
  <script type="text/javascript" src="../../calendario/lang/calendar-es.js"></script>

  <!-- librería que declara la función Calendar.setup, que ayuda a generar un calendario en unas pocas líneas de código -->
  <script type="text/javascript" src="../../calendario/calendar-setup.js"></script>    
  <script type="text/javascript" src="../../js/funciones.js"></script>    
<style type="text/css">
<!--
.Estilo1 {font-size: 24px}
-->
</style>
<style type="text/css">
<!--
TR.data{
	background : #A6A6A6;
	font-family: Verdana, Helvetica, sans-serif;
 	font-size: 12px
}
TR.dataheader{
	font-family: Verdana, Helvetica, sans-serif;
	background : #808080;
	font-weight : bold;
	text-align : center;
	font-size: 12px
}
-->
</style>
<title >Tipo Socio</title>
<?php 

  include('../../conexion.inc.php');
  $link = Conectarse();

mysql_select_db("gotica_sociosgotica",$link);
$valor=$_POST['idsocio'];
if (isset($valor)){
	$valor=$valor;
	}else{
		$valor=$_GET[valor];
		}
?>
<div align="center" class="Estilo1">RENOVACION</div>

<form name="form1" method="post" action="renueva.php">
<table>
<tr>
<?
echo "<input type=\"hidden\" value=\"$valor\" name=\"idsocio\" />";

echo "<td>Fecha Renovacion <input name=\"fechreno\" id=\"fechreno$i\" type=\"text\" value=\"0000-00-00\" maxlength=\"10\" size=\"10\" /><input type=\"button\"  value=\"...\" onclick=\"return showCalendar('fechreno$i', '%Y-%m-%d' , '24', true);\" /></td>  ";
$sql26 = "SELECT * FROM moneda";
$result26 = mysql_query($sql26, $link);
echo "<td>Pago<select name=\"moneda\" >";
while ($row26 = mysql_fetch_array($result26))
{
	echo "<option value=\"".$row26['idmoneda']."\">";
echo $row26['tagmon'];
echo "</option>";
	
}
echo "</select><input name=\"pago\"  type=\"text\" maxlength=\"10\" size=\"10\" />";

echo "</td>";
echo "<td>Tipo de Socio <select name=\"idtiposocio\" >";
$sqll="SELECT * FROM tiposocio";
$resultl = mysql_query($sqll, $link);
while ($row1 = mysql_fetch_array($resultl))
{
echo "<option value=\"".$row1['idTipoSocio']."\">";
echo $row1['TipoSocio'];
echo "</option>"; 
	
}
echo "</select></td><td><input type=\"submit\" name=\"envia\" value=\"Renueva\" /></td>";
?>
</tr>
</table>
</form>
<?
$sqll1="SELECT * FROM renovacion WHERE idsocio=".$valor;
$resultl11 = mysql_query($sqll1, $link);
echo "<table>";
echo "<tr class=\"dataheader\"><td>Fecha</td><td>Tipo de Socio</td><td>Pago</td></tr>";
while( $row111=mysql_fetch_array($resultl11)){
echo "<tr>";
echo "<td>$row111[fecharenovacion]</td>";
echo "<td>$row111[idtiposocio]</td>";
echo "<td>$row111[pago]</td>";
echo "</tr>";
}

echo "<form method=\"post\" action=\"edicionsocio.php\">";
echo "<input type=\"hidden\" value=".$valor." name=\"valor\" />";
echo "<input type=\"submit\"  class=\"buttonmi\" name=\"edit\" value=\"Atras\" />";
echo "</form>";?>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>
